﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ILanguage
{
    public interface ICecream
    {
        void Candy();
    }
    public interface IChotolate
    {
        void Candy();
    }
    //隐式实现
    public class DelStrawberry : ICecream, IChotolate
    {
        public void Candy()
        {
            Console.WriteLine("叽里咕噜");
        }
    }
    //显式调用
    public class Strawberry : ICecream, IChotolate
    {
        void ICecream.Candy()
        {
            Console.WriteLine("咩咩咩~");
        }

        void IChotolate.Candy()
        {
            Console.WriteLine("喵喵喵？");
        }
    }
     
}
